package org.dromara.job.snailjob;

import com.aizuda.snailjob.client.job.core.annotation.JobExecutor;
import com.aizuda.snailjob.client.job.core.dto.JobArgs;
import com.aizuda.snailjob.client.model.ExecuteResult;
import org.apache.dubbo.config.annotation.DubboReference;
import org.dromara.common.core.domain.R;
import org.dromara.system.api.RemotePayService;
import org.springframework.stereotype.Component;

/**
 * @author opensnail
 * @date 2024-05-17
 */
@Component
@JobExecutor(name = "deleteOrderJobExecutor")
public class DeleteOrderJobExecutor {

    @DubboReference
    private RemotePayService remotePayService;

    public ExecuteResult jobExecute(JobArgs jobArgs) {
        R<?> r = remotePayService.cleanOrder(null);
        return ExecuteResult.success("定时清理订单成功");
    }
}

